<template>
  <div id="app">
    <div id="nav">
      <router-link to="/" v-if="!this.$cookies.isKey('username')">登陆  &nbsp;|  &nbsp;</router-link>
      <router-link to="/index">新建记录</router-link>
      <router-link to="/info">|  &nbsp;查询记录</router-link>
    </div>
    <router-view/>
  </div>
</template>

<script>
export default {
  name: 'Home',
  components: {
  },
  data () {
    return {
    }
  },
  methods: {
  },
  mounted () {
  // 30天后过期
    this.$cookies.config('30d')
  }
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

#nav {
  padding: 30px;
}

#nav a {
  font-weight: bold;
  color: #2c3e50;
}

#nav a.router-link-exact-active {
  color: #42b983;
}
</style>
